import request from '@/utils/request'

//组织列表
export function organizationListApi(data) {
  return request({
    url: '/sys/organizationList/',
    method: 'post',
    data,
  })
}

//添加组织
export function addOrganizationApi(data) {
  return request({
    url: '/sys/addOrganization/',
    method: 'post',
    data,
  })
}

// 删除组织
export function deleteOrganizationApi(data) {
  return request({
    url: '/sys/deleteOrganization/',
    method: 'post',
    data,
  })
}

// 编辑组织
export function editOrganizationApi(data) {
  return request({
    url: '/sys/editOrganization/',
    method: 'post',
    data,
  })
}

// 角色列表
export function rolesApi(data) {
  return request({
    url: '/sys/roles/',
    method: 'post',
    data,
  })
}

// 添加角色
export function addRoleApi(data) {
  return request({
    url: '/sys/addRole/',
    method: 'post',
    data,
  })
}

// 编辑角色
export function editRoleApi(data) {
  return request({
    url: '/sys/editRole/',
    method: 'post',
    data,
  })
}

// 删除角色
export function delRoleApi(data) {
  return request({
    url: '/sys/delRole/',
    method: 'post',
    data,
  })
}

// 修改角色状态
export function stsRoleApi(data) {
  return request({
    url: '/sys/stsRole/',
    method: 'post',
    data,
  })
}

// 账号列表
export function usersApi(data) {
  return request({
    url: '/sys/users/',
    method: 'post',
    data,
  })
}

// 添加账号
export function addUserApi(data) {
  return request({
    url: '/sys/addUser/',
    method: 'post',
    data,
  })
}

// 修改账号
export function editUserApi(data) {
  return request({
    url: '/sys/editUser/',
    method: 'post',
    data,
  })
}

// 删除账号
export function delUserApi(data) {
  return request({
    url: '/sys/delUser/',
    method: 'post',
    data,
  })
}

// 账号名称唯一值检查
export function nameCheckApi(data) {
  return request({
    url: '/sys/nameCheck/',
    method: 'post',
    data,
  })
}

// 密码修改
export function changePwdApi(data) {
  return request({
    url: '/sys/changePwd/',
    method: 'post',
    data,
  })
}

// 角色目录
export function roleMenusApi(data) {
  return request({
    url: '/sys/roleMenus/',
    method: 'post',
    data,
  })
}

export function operationLogDataApi(data) {
  return request({
    url: '/sys/operationLogData/',
    method: 'post',
    data,
  })
}

export function loginLogDataApi(data) {
  return request({
    url: '/sys/loginLogData/',
    method: 'post',
    data,
  })
}

export function ClearLogApi(data) {
  return request({
    url: '/sys/ClearLog/',
    method: 'post',
    data,
  })
}

export function sqlBackUpBtnApi(data) {
  return request({
    url: '/sys/BackUpSql/',
    method: 'post',
    data,
  })
}

export function SqlRestorationApi(data) {
  return request({
    url: '/sys/SqlRestoration/',
    method: 'post',
    data,
  })
}

export function GetAllRolesApi(data) {
  return request({
    url: '/sys/getAllRoles/',
    method: 'post',
    data,
  })
}

export function getRoleUserApi(data) {
  return request({
    url: '/sys/getRoleUser/',
    method: 'post',
    data,
  })
}

// 菜单列表
export function permissionListApi(data) {
  return request({
    url: '/sys/listPermission/',
    method: 'post',
    data,
  })
}
// 添加菜单
export function addPermissionApi(data) {
  return request({
    url: '/sys/addPermission/',
    method: 'post',
    data,
  })
}
// 编辑菜单
export function editPermissionApi(data) {
  return request({
    url: '/sys/editPermission/',
    method: 'post',
    data,
  })
}
// 删除菜单
export function delPermissionApi(data) {
  return request({
    url: '/sys/delPermission/',
    method: 'post',
    data,
  })
}

// 部门管理
// 部门列表
export function apiDepartmentList(data) {
  return request({
    url: '/three/dept_list/',
    method: 'post',
    data,
  })
}
// 部门详情
export function apiDepartmentDetail(data) {
  return request({
    url: '/three/dept_detail/',
    method: 'post',
    data,
  })
}
// 部门添加
export function apiDepartmentAdd(data) {
  return request({
    url: '/three/dept_add/',
    method: 'post',
    data,
  })
}
// 部门编辑
export function apiDepartmentEdit(data) {
  return request({
    url: '/three/dept_edit/',
    method: 'post',
    data,
  })
}
// 部门删除
export function apiDepartmentDelete(data) {
  return request({
    url: '/three/dept_del/',
    method: 'post',
    data,
  })
}
